<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="./css/normalize_zh.css" />
    <link rel="stylesheet" type="text/css" href="./css/shop.css" />
    <link rel="stylesheet" href="./css/baseShop.css">
</head>

<body>
    <header class="y_header">
        <nav>
            <div id="userName" class="userdiv"></div>
        </nav>
    </header>
    <div class="wm_shop" id="shopItem">
    </div>

    <script src="../game/js/jquery-3.1.1.min.js"></script>
    <script src="res/artTemplate/template-native.js"></script>
    <script src="./js/base.js"></script>
    <script src="./js/shop.js"></script>
    <script type="text/template" id="userTpl">
        <%if(userInfo!==""){%>

            <a href="#" class="userColor"><span>欢迎登陆 &nbsp  &nbsp &nbsp <%=userInfo%></span>
                <a href="javascript:loginOut();" class="userColor">退出</a>

            </a>
            <% } else {%>
                <a href="login.html" class="userColor">登录<%=userInfo%></a>
                <% }%>
    </script>
    <script type="text/template" id="shopTpl">
        <%  for(let i=0;i<data.length;i++) {%>
            <div class="wm_item">
                <div class="wm_item_img">
                    <a href="shop_item.html?id=<%=data[i].id%>">
                        <img src="<%=data[i].pic[0].picAddr%>">
                    </a>
                </div>
                <div class="wm_item_detail">
                    <p>
                        <a href="shop_item.html?id=<%=data[i].id%>">
                            <%=data[i].proName%>
                        </a>
                    </p>
                    <p>
                        <span>¥</span>
                        <span>	<%=data[i].price%></span>
                        <span>已售：<%=data[i].sales%>件</span>
                    </p>
                </div>
                <div class="wm_rates">
                    <h4>评论(
                        <a href="#">
                            <%=data[i].commentsNum%>
                        </a>)</h4>
                </div>
            </div>
            <% }%>
    </script>
</body>

</html>